package com.jswj.screenshot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jswj.screenshot.mapper.ScreenshotMapper;
import com.jswj.screenshot.domain.Screenshot;
import com.jswj.screenshot.service.IScreenshotService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 截图Service业务层处理
 * 
 * @author whh
 * @date 2021-07-07
 */
@Service
public class ScreenshotServiceImpl implements IScreenshotService 
{
    @Autowired
    private ScreenshotMapper screenshotMapper;

    /**
     * 查询截图
     * 
     * @param id 截图ID
     * @return 截图
     */
    @Override
    public Screenshot selectScreenshotById(Long id)
    {
        return screenshotMapper.selectScreenshotById(id);
    }

    /**
     * 查询截图列表
     * 
     * @param screenshot 截图
     * @return 截图
     */
    @Override
    public List<Screenshot> selectScreenshotList(Screenshot screenshot)
    {
        return screenshotMapper.selectScreenshotList(screenshot);
    }

    /**
     * 新增截图
     * 
     * @param screenshot 截图
     * @return 结果
     */
    @Override
    public int insertScreenshot(Screenshot screenshot)
    {
        return screenshotMapper.insertScreenshot(screenshot);
    }

    /**
     * 修改截图
     * 
     * @param screenshot 截图
     * @return 结果
     */
    @Override
    public int updateScreenshot(Screenshot screenshot)
    {
        return screenshotMapper.updateScreenshot(screenshot);
    }

    /**
     * 删除截图对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteScreenshotByIds(String ids)
    {
        return screenshotMapper.deleteScreenshotByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除截图信息
     * 
     * @param id 截图ID
     * @return 结果
     */
    @Override
    public int deleteScreenshotById(Long id)
    {
        return screenshotMapper.deleteScreenshotById(id);
    }
}
